chore: update maintenance dependencies#1494
Conversation
|
Deployment failed with the following error: Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (2)
✅ Files skipped from review due to trivial changes (4)
Walkthrough本次变更迁移 ESLint 配置为 Flat Config,调整 TypeScript 编译与全局类型声明,升级开发依赖与 React 版本,补充分组型 Dependabot 配置,并修改 README 顶部徽标链接及测试模拟签名。 Changes工具链与依赖升级
Estimated code review effort: 3 (Moderate) | ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
React Doctor found no issues. 🎉 Reviewed by React Doctor for commit |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request updates the project dependencies (including React 19, TypeScript 6, and ESLint 9), introduces a flat ESLint configuration, adds global type definitions, and groups Dependabot updates. Feedback focuses on improving type safety and robustness: specifically, it is highly recommended to keep strict type checking enabled in tsconfig.json rather than disabling it, to use explicit this parameter typing in tests/refs.spec.tsx instead of an unsafe type assertion, and to apply optional chaining in eslint.config.mjs to avoid potential runtime errors.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
❌ Deploy failed
📋 Build log (last lines)🤖 Powered by surge-preview |
|||||||||
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1494 +/- ##
=======================================
Coverage 99.04% 99.04%
=======================================
Files 45 45
Lines 1362 1362
Branches 409 409
=======================================
Hits 1349 1349
Misses 13 13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Deployment failed with the following error: Learn More: https://vercel.com/afc163s-projects?upgradeToPro=build-rate-limit |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
global.d.ts (1)
32-47: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win改为直接引用 Vitest 的
vi类型项目已经依赖并运行 Vitest,测试里也在使用
vi.mock、vi.importActual、vi.advanceTimersByTime、vi.clearAllMocks等 API;手写子集后续很容易和真实类型漂移。直接复用官方类型更稳妥。建议修复
-declare const vi: { - fn: <T extends (...args: any[]) => any = (...args: any[]) => any>( - implementation?: T, - ) => jest.MockedFunction<T>; - mock: (moduleName: string, factory?: (importOriginal: <T>() => Promise<T>) => unknown) => void; - spyOn: typeof jest.spyOn; - useFakeTimers: () => void; - useRealTimers: () => void; - advanceTimersByTime: (msToRun: number) => void; - clearAllTimers: () => void; - runAllTimers: () => void; - importActual: <T>(moduleName: string) => Promise<T>; - clearAllMocks: () => void; - resetAllMocks: () => void; - restoreAllMocks: () => void; -}; +declare const vi: typeof import('vitest').vi;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@global.d.ts` around lines 32 - 47, The manual vi declaration in vi’s global typing should be replaced with the official Vitest vi type so it stays aligned with the real API surface. Update the global.d.ts declaration that defines vi to reference Vitest’s exported type instead of listing a handwritten subset, and keep the existing test helpers like vi.mock, vi.importActual, and vi.advanceTimersByTime working through the official typing.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@eslint.config.mjs`:
- Around line 18-47: The TS rule filtering in normalizeConfig is too narrow
because it only keeps rules from recommendedTsRules, which will drop legacy but
still-used `@typescript-eslint` rules like no-empty-interface and
no-inferrable-types and change lint behavior during migration. Update the
filtering logic to validate against the full tsEslintPlugin.rules set instead of
just recommended, and make sure the local consistent-type-exports shim remains
preserved when building the final rules object.
In `@package.json`:
- Around line 99-104: React 19 compatibility is blocked by
react-dnd-html5-backend and react-window, whose peer dependencies still only
declare support for older React versions. Update the dependency entries in
package.json by replacing or upgrading react-dnd-html5-backend and react-window
to versions that explicitly support react@19/react-dom@19, while leaving
react-dnd as-is since it already accepts any React version. Verify the package
manifest and lockfile stay consistent after the dependency change.
In `@README.md`:
- Line 62: The installation command in the README is a typo: replace the
गैर-standard “ut install” with “npm install” in the setup instructions. Update
both affected occurrences in the install steps so the documented commands are
consistent with the rest of the npm-based workflow (e.g. npm start, npm run
lint) and users can follow the setup correctly.
In `@README.zh-CN.md`:
- Around line 62-64: The install command in the README is a typo: update the
affected install instructions in the README.zh-CN content so they use npm
install instead of ut install, matching the standard npm-based setup and the
same wording used elsewhere in the docs. Keep the change limited to the install
command text in the relevant README sections.
---
Nitpick comments:
In `@global.d.ts`:
- Around line 32-47: The manual vi declaration in vi’s global typing should be
replaced with the official Vitest vi type so it stays aligned with the real API
surface. Update the global.d.ts declaration that defines vi to reference
Vitest’s exported type instead of listing a handwritten subset, and keep the
existing test helpers like vi.mock, vi.importActual, and vi.advanceTimersByTime
working through the official typing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2f0b9d67-3fa8-4eb2-a270-976864c17037
📒 Files selected for processing (8)
.github/dependabot.ymlREADME.mdREADME.zh-CN.mdeslint.config.mjsglobal.d.tspackage.jsontests/refs.spec.tsxtsconfig.json
|
Deployment failed with the following error: Learn More: https://vercel.com/afc163s-projects?upgradeToPro=build-rate-limit |
|
Related to ant-design/ant-design#58514. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Updates project maintenance tooling and docs by modernizing TypeScript/ESLint setup, refreshing dependencies, and improving branding links.
Changes:
- Migrate ESLint to flat config (ESLint 9 + typescript-eslint 8) and update related lint dependencies
- Update React/TypeScript/testing/tooling dependencies and adjust TS config/type includes
- Link Ant Design logo in READMEs to https://ant.design and group Dependabot updates
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Updates module resolution and compiler options; restructures path mappings and include/exclude lists |
| tests/refs.spec.tsx | Adjusts scrollIntoView typing for stricter TS compatibility |
| package.json | Refreshes React/TS/ESLint/testing/lint-staged dependencies and adds flat-config-related packages |
| global.d.ts | Adds global type references and ambient module declarations |
| eslint.config.mjs | Introduces ESLint flat configuration with React/TS/Jest integrations |
| README.md | Wraps Ant Design logo with link to https://ant.design |
| README.zh-CN.md | Wraps Ant Design logo with link to https://ant.design |
| .github/dependabot.yml | Adds grouping for npm and GitHub Actions Dependabot updates |
| .eslintrc.js | Removes legacy ESLint config (replaced by flat config) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| linterOptions: { | ||
| reportUnusedDisableDirectives: 'off', | ||
| }, |
| 'no-extra-boolean-cast': 'off', | ||
| 'no-undef': 'off', | ||
| 'no-unused-vars': 'off', | ||
| 'react/no-find-dom-node': 'off', |

Summary
Test Plan
Summary by CodeRabbit
scrollIntoView调用上下文的模拟方式,提升测试稳定性。